package com.example.demo.serviceImpl;

import com.example.demo.dao.AdminDAO;
import com.example.demo.entity.User;
import com.example.demo.service.QueryUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("QueryUserServiceImpl")
public class QueryUserServiceImpl implements QueryUserService {


    @Autowired
    private AdminDAO adminDAO;

    @Override
    @Transactional     //-->出错则事务回滚，不会添加到数据库(不会处理请求)
    public User queryUser(User user) {
            User login_user =  adminDAO.queryUser(user);
            return login_user;
    }


}
